package com.cals;

import java.util.Scanner;

/*
水仙花数
*/
public class Demo7 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入三位数，判断是否为水仙花数：");
        int number = sc.nextInt();
        int ge = number % 10;
        int shi = (number / 10) % 10;
        int bai = (number / 100) % 10;
        String resout = ((ge * ge * ge + shi * shi * shi + bai * bai * bai) == number) ? "是水仙花数！" : "不是水仙花数！";
        System.out.println(resout);
    }
}
